package mju.cxf.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("cxf_order") // 表示对应的数据库表名为 "cxf_order"
 public class Order implements Serializable {
    private static final long serialVersionUID = 1L; // 可选，指定版本号

    @TableId(type = IdType.AUTO)
    private Integer id;  // 编号

    @TableField("number")
    private String number; // 订单编号

    @TableField("product_id")
    private Integer productId; //商品id

    @TableField("amount")
    private Double amount; //支付金额

   @TableField("integral_price")
   private Double integralPrice; //积分抵扣

   @TableField("member_price")
   private Double memberPrice; //会员抵扣

   @TableField("order_price")
   private Double orderPrice; //订单金额

    @TableField("user_id")
    private Integer userId; //用户id

    @TableField("status")
    private Integer status; //状态

    @TableField(value = "creation_time")
    private LocalDateTime creationTime; //订单创建id
    @TableField(value = "quantity")
    private int quantity;
    @TableField("payment_time")
    private LocalDateTime paymentTime; //订单支付时间

    @TableField("completion_time")
    private LocalDateTime completionTime; //订单完成时间

    @TableField("description")
    private String description; //订单备注
}
